import {EntityModel} from "@midwayjs/orm";
import {Column, PrimaryGeneratedColumn} from 'typeorm';

@EntityModel('mid_resource')

export class Resource {
  @PrimaryGeneratedColumn('uuid')
  id: string;
  //父节点id
  @Column({
    length: 36
  })
  parentId: string
  //资源名称
  @Column({
    length: 100
  })
  name: string;
  //路由地址
  @Column({
    length: 100
  })
  url: string
  //类型
  @Column()
  type: number;
//  是否可见
  @Column()
  isShow: number
  //排序号
  @Column()
  sortNum: number
//  所属角色
@Column('text')
  belongRole:string
}
